package com.dzsw.univer.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/d")
public class DemoController {

    @GetMapping("/t0")
    @ResponseBody
    public String test0() {
        return "test0";
    }

    @GetMapping("/t1")
    public String test1(Model model) {
        model.addAttribute("message", "Hello, Thymeleaf!555");
        model.addAttribute("imageFile", "/images/cat.png");
        return "index";
    }

    @GetMapping("/t2")
    public String test2(Model model) {
        model.addAttribute("message", "Hello, Thymeleaf!555");
        model.addAttribute("imageFile", "/images/cat.png");
        return "main/excel";
    }

}
